package com.example.poemtest.mine;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.example.poemtest.Activity.BottomNavigationViewActivity;
import com.example.poemtest.R;
import com.example.poemtest.utils.FullScreenUtil;

/**
 * 帮助与反馈页面
 */
public class HelpActivity extends AppCompatActivity implements View.OnClickListener {

    //属性
    private RelativeLayout question, myQuestion;
    private ImageView back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        FullScreenUtil.getInstance().fullScreen(this,true);
        setContentView(R.layout.activity_help);
        //绑定控件对象
        initData();
    }
    /**
     * 绑定控件对象
     */
    private void initData() {
        question = findViewById(R.id.question);
        myQuestion = findViewById(R.id.my_question);
        question.setOnClickListener(this);
        myQuestion.setOnClickListener(this);
        back = findViewById(R.id.back);
        back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.question:
                //点击反馈问题，跳转到反馈问题页面
                Intent intent = new Intent(this, QuestionActivity.class);
                startActivity(intent);
                break;
            case R.id.my_question:
                //点击我的问题，跳转到我的问题页面，查看我所提出的问题
                Intent intent1 = new Intent(this, MyQuestionActivity.class);
                startActivity(intent1);
                break;
            case R.id.back:
                Intent intent2 = new Intent(this, BottomNavigationViewActivity.class);
                intent2.putExtra("id",4);
                startActivity(intent2);
            default:
                break;
        }
    }
}